package com.shuimin.service.util;

import pond.common.STRING;

/**
 * Created by sky on 16/8/12.
 */
public class ViewFormatUtil {

    /**
     * 隐藏电话号码前7位,只显示后四位
     * @param phone
     * @return
     */
    public static String hidePhone(String phone){
        if(STRING.notBlank(phone) && phone.length() == 11){
            String last = phone.substring(phone.length() - 4, phone.length());
            return "*******"+last;
        }
        else{
            return "";
        }
    }
}
